<template>
  <div class="page_box">
    <div class="page_header">
      <el-page-header v-if="title" @back="goBack" :content="title">
      </el-page-header>
      <div v-else class="index">首页</div>
    </div>
    <!-- <div class="box">
    </div> -->
    <div class="page_content">
      <transition name="el-zoom-in-center">
        <router-view />
      </transition>
    </div>
  </div>
</template>

<script>
export default {
  name: "layoutCom",
  data() {
    return {
      value: "",
    };
  },
  methods: {
    goBack() {
      this.$router.back();
    },
  },
  computed: {
    title() {
      return this.$route.query.title;
    },
  },
};
</script>

<style scoped lang="scss">
.page_box {
  width: 100%;
  height: 100%;
  .page_header {
    height: 40px;
    .index {
      font-size: 20px;
      font-weight: 600;
    }
  }
}
</style>
